<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: widget-position-align   Widget-PositionAlign.js  (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
	<link rel="stylesheet" type="text/css" href="assets/api.css" />

    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
        <h3>widget-position-align&nbsp; <span class="subtitle">3.1.1</span></h3>
        <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> 
            &gt; <a href="./module_widget-position-align.html" title="widget-position-align">widget-position-align</a>
                
                 &gt; Widget-PositionAlign.js (source view) 
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                    <div id="srcout">
                        <style>
                            #doc3 .classopts { display:none; }
                        </style>
                        <div class="highlight"><pre><span class="cm">/**</span>
<span class="cm"> * Provides extended/advanced XY positioning support for Widgets, through an extension.</span>
<span class="cm"> *</span>
<span class="cm"> * It builds on top of the widget-position module, to provide alignmentment and centering support.</span>
<span class="cm"> * Future releases aim to add constrained and fixed positioning support.</span>
<span class="cm"> *</span>
<span class="cm"> * @module widget-position-align</span>
<span class="cm"> */</span>
        <span class="kd">var</span> <span class="nx">L</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">Lang</span><span class="p">,</span>
            <span class="nx">ALIGN</span> <span class="o">=</span> <span class="s2">&quot;align&quot;</span><span class="p">,</span>

            <span class="nx">BINDUI</span> <span class="o">=</span> <span class="s2">&quot;bindUI&quot;</span><span class="p">,</span>
            <span class="nx">SYNCUI</span> <span class="o">=</span> <span class="s2">&quot;syncUI&quot;</span><span class="p">,</span>

            <span class="nx">OFFSET_WIDTH</span> <span class="o">=</span> <span class="s2">&quot;offsetWidth&quot;</span><span class="p">,</span>
            <span class="nx">OFFSET_HEIGHT</span> <span class="o">=</span> <span class="s2">&quot;offsetHeight&quot;</span><span class="p">,</span>
            <span class="nx">VIEWPORT_REGION</span> <span class="o">=</span> <span class="s2">&quot;viewportRegion&quot;</span><span class="p">,</span>
            <span class="nx">REGION</span> <span class="o">=</span> <span class="s2">&quot;region&quot;</span><span class="p">,</span>

            <span class="nx">AlignChange</span> <span class="o">=</span> <span class="s2">&quot;alignChange&quot;</span><span class="p">;</span>

        <span class="cm">/**</span>
<span class="cm">         * Widget extension, which can be used to add extended XY positioning support to the base Widget class,</span>
<span class="cm">         * through the &lt;a href=&quot;Base.html#method_build&quot;&gt;Base.build&lt;/a&gt; method. This extension requires that </span>
<span class="cm">         * the WidgetPosition extension be added to the Widget (before WidgetPositionAlign, if part of the same </span>
<span class="cm">         * extension list passed to Base.build).</span>
<span class="cm">         *</span>
<span class="cm">         * @class WidgetPositionAlign</span>
<span class="cm">         * @param {Object} User configuration object</span>
<span class="cm">         */</span>
        <span class="kd">function</span> <span class="nx">PositionAlign</span><span class="p">(</span><span class="nx">config</span><span class="p">)</span> <span class="p">{</span>
            <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="k">this</span><span class="p">.</span><span class="nx">_posNode</span><span class="p">)</span> <span class="p">{</span>
                <span class="nx">Y</span><span class="p">.</span><span class="nx">error</span><span class="p">(</span><span class="s2">&quot;WidgetPosition needs to be added to the Widget, before WidgetPositionAlign is added&quot;</span><span class="p">);</span> 
            <span class="p">}</span>
            <span class="nx">Y</span><span class="p">.</span><span class="nx">after</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_syncUIPosAlgin</span><span class="p">,</span> <span class="k">this</span><span class="p">,</span> <span class="nx">SYNCUI</span><span class="p">);</span>
            <span class="nx">Y</span><span class="p">.</span><span class="nx">after</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_bindUIPosAlign</span><span class="p">,</span> <span class="k">this</span><span class="p">,</span> <span class="nx">BINDUI</span><span class="p">);</span>
        <span class="p">}</span>

        <span class="cm">/**</span>
<span class="cm">         * Static property used to define the default attribute </span>
<span class="cm">         * configuration introduced by WidgetPositionAlign.</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.ATTRS</span>
<span class="cm">         * @type Object</span>
<span class="cm">         * @static</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">ATTRS</span> <span class="o">=</span> <span class="p">{</span>

            <span class="cm">/**</span>
<span class="cm">             * @attribute align</span>
<span class="cm">             * @type Object</span>
<span class="cm">             * @default null</span>
<span class="cm">             * @desciption The align attribute is used to align a reference point on the widget, with the refernce point on another node, or the viewport. </span>
<span class="cm">             * The object which align expects has the following properties:</span>
<span class="cm">             * &lt;dl&gt;</span>
<span class="cm">             *       &lt;dt&gt;node&lt;/dt&gt;</span>
<span class="cm">             *       &lt;dd&gt;</span>
<span class="cm">             *         The node to which the Widget is to be aligned. If set to null, or not provided, the Widget is aligned to the viewport</span>
<span class="cm">             *       &lt;/dd&gt;</span>
<span class="cm">             *       &lt;dt&gt;points&lt;/dt&gt;</span>
<span class="cm">             *       &lt;dd&gt;</span>
<span class="cm">             *         &lt;p&gt;</span>
<span class="cm">             *         A two element array, defining the two points on the Widget and node/viewport which are to be aligned. The first element is the point on the Widget, and the second element is the point on the node/viewport.</span>
<span class="cm">             *         Supported alignment points are defined as static properties on &lt;code&gt;WidgetPositionAlign&lt;/code&gt;.</span>
<span class="cm">             *         &lt;/p&gt;</span>
<span class="cm">             *         &lt;p&gt;</span>
<span class="cm">             *         e.g. &lt;code&gt;[WidgetPositionAlign.TR, WidgetPositionAlign.TL]&lt;/code&gt; aligns the Top-Right corner of the Widget with the</span>
<span class="cm">             *         Top-Left corner of the node/viewport, and &lt;code&gt;[WidgetPositionAlign.CC, WidgetPositionAlign.TC]&lt;/code&gt; aligns the Center of the </span>
<span class="cm">             *         Widget with the Top-Center edge of the node/viewport.</span>
<span class="cm">             *         &lt;/p&gt;</span>
<span class="cm">             *       &lt;/dd&gt;</span>
<span class="cm">             *   &lt;/dl&gt;</span>
<span class="cm">             */</span>
            <span class="nx">align</span><span class="o">:</span> <span class="p">{</span>
                <span class="nx">value</span><span class="o">:</span><span class="kc">null</span>
            <span class="p">},</span>

            <span class="cm">/**</span>
<span class="cm">             * @attribute centered</span>
<span class="cm">             * @type {boolean | node} </span>
<span class="cm">             * @default false</span>
<span class="cm">             * @description A convenience attribute, which can be used as a shortcut for the align attribute.</span>
<span class="cm">             * If set to true, the Widget is centered in the viewport. If set to a node reference or valid selector string,</span>
<span class="cm">             * the Widget will be centered within the node. If set the false, no center positioning is applied.</span>
<span class="cm">             */</span>
            <span class="nx">centered</span><span class="o">:</span> <span class="p">{</span>
                <span class="nx">setter</span><span class="o">:</span> <span class="s2">&quot;_setAlignCenter&quot;</span><span class="p">,</span>
                <span class="nx">lazyAdd</span><span class="o">:</span><span class="kc">false</span><span class="p">,</span>
                <span class="nx">value</span><span class="o">:</span><span class="kc">false</span>
            <span class="p">}</span>
        <span class="p">};</span>

        <span class="cm">/**</span>
<span class="cm">         * Constant used to specify the top-left corner for alignment</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.TL</span>
<span class="cm">         * @type String</span>
<span class="cm">         * @static</span>
<span class="cm">         * @value &quot;tl&quot;</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">TL</span> <span class="o">=</span> <span class="s2">&quot;tl&quot;</span><span class="p">;</span>
        <span class="cm">/**</span>
<span class="cm">         * Constant used to specify the top-right corner for alignment</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.TR</span>
<span class="cm">         * @type String</span>
<span class="cm">         * @static</span>
<span class="cm">         * @value &quot;tr&quot;</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">TR</span> <span class="o">=</span> <span class="s2">&quot;tr&quot;</span><span class="p">;</span>
        <span class="cm">/**</span>
<span class="cm">         * Constant used to specify the bottom-left corner for alignment</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.BL</span>
<span class="cm">         * @type String</span>
<span class="cm">         * @static</span>
<span class="cm">         * @value &quot;bl&quot;</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">BL</span> <span class="o">=</span> <span class="s2">&quot;bl&quot;</span><span class="p">;</span>
        <span class="cm">/**</span>
<span class="cm">         * Constant used to specify the bottom-right corner for alignment</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.BR</span>
<span class="cm">         * @type String</span>
<span class="cm">         * @static</span>
<span class="cm">         * @value &quot;br&quot;</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">BR</span> <span class="o">=</span> <span class="s2">&quot;br&quot;</span><span class="p">;</span>
        <span class="cm">/**</span>
<span class="cm">         * Constant used to specify the top edge-center point for alignment</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.TC</span>
<span class="cm">         * @type String</span>
<span class="cm">         * @static</span>
<span class="cm">         * @value &quot;tc&quot;</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">TC</span> <span class="o">=</span> <span class="s2">&quot;tc&quot;</span><span class="p">;</span>
        <span class="cm">/**</span>
<span class="cm">         * Constant used to specify the right edge, center point for alignment</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.RC</span>
<span class="cm">         * @type String</span>
<span class="cm">         * @static</span>
<span class="cm">         * @value &quot;rc&quot;</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">RC</span> <span class="o">=</span> <span class="s2">&quot;rc&quot;</span><span class="p">;</span>
        <span class="cm">/**</span>
<span class="cm">         * Constant used to specify the bottom edge, center point for alignment</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.BC</span>
<span class="cm">         * @type String</span>
<span class="cm">         * @static</span>
<span class="cm">         * @value &quot;bc&quot;</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">BC</span> <span class="o">=</span> <span class="s2">&quot;bc&quot;</span><span class="p">;</span>
        <span class="cm">/**</span>
<span class="cm">         * Constant used to specify the left edge, center point for alignment</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.LC</span>
<span class="cm">         * @type String</span>
<span class="cm">         * @static</span>
<span class="cm">         * @value &quot;lc&quot;</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">LC</span> <span class="o">=</span> <span class="s2">&quot;lc&quot;</span><span class="p">;</span>
        <span class="cm">/**</span>
<span class="cm">         * Constant used to specify the center of widget/node/viewport for alignment</span>
<span class="cm">         * </span>
<span class="cm">         * @property WidgetPositionAlign.CC</span>
<span class="cm">         * @type String</span>
<span class="cm">         * @static</span>
<span class="cm">         * @value &quot;cc&quot;</span>
<span class="cm">         */</span>
        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">CC</span> <span class="o">=</span> <span class="s2">&quot;cc&quot;</span><span class="p">;</span>

        <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">prototype</span> <span class="o">=</span> <span class="p">{</span>

            <span class="cm">/**</span>
<span class="cm">             * Synchronizes the UI to match the Widgets align configuration.</span>
<span class="cm">             * </span>
<span class="cm">             * This method in invoked after syncUI is invoked for the Widget class</span>
<span class="cm">             * using YUI&#39;s aop infrastructure.</span>
<span class="cm">             *</span>
<span class="cm">             * @method _syncUIPosAlgin</span>
<span class="cm">             * @protected</span>
<span class="cm">             */</span>
            <span class="nx">_syncUIPosAlgin</span> <span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
                <span class="kd">var</span> <span class="nx">align</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">ALIGN</span><span class="p">);</span>
                <span class="k">if</span> <span class="p">(</span><span class="nx">align</span><span class="p">)</span> <span class="p">{</span>
                    <span class="k">this</span><span class="p">.</span><span class="nx">_uiSetAlign</span><span class="p">(</span><span class="nx">align</span><span class="p">.</span><span class="nx">node</span><span class="p">,</span> <span class="nx">align</span><span class="p">.</span><span class="nx">points</span><span class="p">);</span>
                <span class="p">}</span>
            <span class="p">},</span>

            <span class="cm">/**</span>
<span class="cm">             * Binds event listeners responsible for updating the UI state in response to </span>
<span class="cm">             * Widget extended positioning related state changes.</span>
<span class="cm">             * &lt;p&gt;</span>
<span class="cm">             * This method is invoked after bindUI is invoked for the Widget class</span>
<span class="cm">             * using YUI&#39;s aop infrastructure.</span>
<span class="cm">             * &lt;/p&gt;</span>
<span class="cm">             * @method _bindUIStack</span>
<span class="cm">             * @protected</span>
<span class="cm">             */</span>
            <span class="nx">_bindUIPosAlign</span> <span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
                <span class="k">this</span><span class="p">.</span><span class="nx">after</span><span class="p">(</span><span class="nx">AlignChange</span><span class="p">,</span> <span class="k">this</span><span class="p">.</span><span class="nx">_afterAlignChange</span><span class="p">);</span>
            <span class="p">},</span>

            <span class="cm">/**</span>
<span class="cm">             * Default setter for center attribute changes. Sets up the appropriate value, and passes </span>
<span class="cm">             * it through the to the align attribute.</span>
<span class="cm">             *</span>
<span class="cm">             * @method _setAlignCenter</span>
<span class="cm">             * @protected</span>
<span class="cm">             * @param {boolean | node} The attribute value being set. </span>
<span class="cm">             * @return {Number} The attribute value being set.</span>
<span class="cm">             */</span>
            <span class="nx">_setAlignCenter</span> <span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">val</span><span class="p">)</span> <span class="p">{</span>
                <span class="k">if</span> <span class="p">(</span><span class="nx">val</span><span class="p">)</span> <span class="p">{</span>
                    <span class="k">this</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ALIGN</span><span class="p">,</span> <span class="p">{</span>
                        <span class="nx">node</span><span class="o">:</span> <span class="nx">val</span> <span class="o">===</span> <span class="kc">true</span> <span class="o">?</span> <span class="kc">null</span> <span class="o">:</span> <span class="nx">val</span><span class="p">,</span>
                        <span class="nx">points</span><span class="o">:</span> <span class="p">[</span><span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">CC</span><span class="p">,</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">CC</span><span class="p">]</span>
                    <span class="p">});</span>
                <span class="p">}</span>
                <span class="k">return</span> <span class="nx">val</span><span class="p">;</span>
            <span class="p">},</span>

            <span class="cm">/**</span>
<span class="cm">             * Default attribute change listener for the align attribute, responsible</span>
<span class="cm">             * for updating the UI, in response to attribute changes.</span>
<span class="cm">             * </span>
<span class="cm">             * @method _afterAlignChange</span>
<span class="cm">             * @protected</span>
<span class="cm">             * @param {EventFacade} e The event facade for the attribute change</span>
<span class="cm">             */</span>
            <span class="nx">_afterAlignChange</span> <span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
                <span class="k">if</span> <span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">newVal</span><span class="p">)</span> <span class="p">{</span>
                    <span class="k">this</span><span class="p">.</span><span class="nx">_uiSetAlign</span><span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">newVal</span><span class="p">.</span><span class="nx">node</span><span class="p">,</span> <span class="nx">e</span><span class="p">.</span><span class="nx">newVal</span><span class="p">.</span><span class="nx">points</span><span class="p">);</span>
                <span class="p">}</span>
            <span class="p">},</span>

            <span class="cm">/**</span>
<span class="cm">             * Updates the UI to reflect the align value passed in (see the align attribute documentation, for the object stucture expected)</span>
<span class="cm">             * @method _uiSetAlign</span>
<span class="cm">             * @protected</span>
<span class="cm">             * @param {Node | null} The node to align to, or null to indicate the viewport</span>
<span class="cm">             */</span>
            <span class="nx">_uiSetAlign</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">points</span><span class="p">)</span> <span class="p">{</span>

                <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">L</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">points</span><span class="p">)</span> <span class="o">||</span> <span class="nx">points</span><span class="p">.</span><span class="nx">length</span> <span class="o">!=</span> <span class="mi">2</span><span class="p">)</span> <span class="p">{</span>
                    <span class="nx">Y</span><span class="p">.</span><span class="nx">error</span><span class="p">(</span><span class="s2">&quot;align: Invalid Points Arguments&quot;</span><span class="p">);</span>
                    <span class="k">return</span><span class="p">;</span>
                <span class="p">}</span>

                <span class="kd">var</span> <span class="nx">nodeRegion</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">_getRegion</span><span class="p">(</span><span class="nx">node</span><span class="p">),</span> 
                    <span class="nx">widgetPoint</span><span class="p">,</span> 
                    <span class="nx">nodePoint</span><span class="p">,</span> 
                    <span class="nx">xy</span><span class="p">;</span>

                <span class="k">if</span> <span class="p">(</span><span class="nx">nodeRegion</span><span class="p">)</span> <span class="p">{</span>

                    <span class="nx">widgetPoint</span> <span class="o">=</span> <span class="nx">points</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span>
                    <span class="nx">nodePoint</span> <span class="o">=</span> <span class="nx">points</span><span class="p">[</span><span class="mi">1</span><span class="p">];</span>

                    <span class="c1">// TODO: Optimize KWeight - Would lookup table help?</span>
                    <span class="k">switch</span> <span class="p">(</span><span class="nx">nodePoint</span><span class="p">)</span> <span class="p">{</span>
                        <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">TL</span><span class="o">:</span>
                            <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">left</span><span class="p">,</span> <span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">top</span><span class="p">];</span>
                            <span class="k">break</span><span class="p">;</span>
                        <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">TR</span><span class="o">:</span>
                            <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">right</span><span class="p">,</span> <span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">top</span><span class="p">];</span>
                            <span class="k">break</span><span class="p">;</span>
                        <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">BL</span><span class="o">:</span>
                            <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">left</span><span class="p">,</span> <span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">bottom</span><span class="p">];</span>
                            <span class="k">break</span><span class="p">;</span>
                        <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">BR</span><span class="o">:</span>
                            <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">right</span><span class="p">,</span> <span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">bottom</span><span class="p">];</span>
                            <span class="k">break</span><span class="p">;</span>
                        <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">TC</span><span class="o">:</span>
                            <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">left</span> <span class="o">+</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">floor</span><span class="p">(</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">width</span><span class="o">/</span><span class="mi">2</span><span class="p">),</span> <span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">top</span><span class="p">];</span>
                            <span class="k">break</span><span class="p">;</span>
                        <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">BC</span><span class="o">:</span>
                            <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">left</span> <span class="o">+</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">floor</span><span class="p">(</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">width</span><span class="o">/</span><span class="mi">2</span><span class="p">),</span> <span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">bottom</span><span class="p">];</span>
                            <span class="k">break</span><span class="p">;</span>
                        <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">LC</span><span class="o">:</span>
                            <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">left</span><span class="p">,</span> <span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">top</span> <span class="o">+</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">floor</span><span class="p">(</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">height</span><span class="o">/</span><span class="mi">2</span><span class="p">)];</span>
                            <span class="k">break</span><span class="p">;</span>
                        <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">RC</span><span class="o">:</span>
                            <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">right</span><span class="p">,</span> <span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">top</span> <span class="o">+</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">floor</span><span class="p">(</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">height</span><span class="o">/</span><span class="mi">2</span><span class="p">),</span> <span class="nx">widgetPoint</span><span class="p">];</span>
                            <span class="k">break</span><span class="p">;</span>
                        <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">CC</span><span class="o">:</span>
                            <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">left</span> <span class="o">+</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">floor</span><span class="p">(</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">width</span><span class="o">/</span><span class="mi">2</span><span class="p">),</span> <span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">top</span> <span class="o">+</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">floor</span><span class="p">(</span><span class="nx">nodeRegion</span><span class="p">.</span><span class="nx">height</span><span class="o">/</span><span class="mi">2</span><span class="p">),</span> <span class="nx">widgetPoint</span><span class="p">];</span>
                            <span class="k">break</span><span class="p">;</span>
                        <span class="k">default</span><span class="o">:</span>
                            <span class="nx">Y</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&quot;align: Invalid Points Arguments&quot;</span><span class="p">,</span> <span class="s2">&quot;info&quot;</span><span class="p">,</span> <span class="s2">&quot;widget-position-align&quot;</span><span class="p">);</span>
                            <span class="k">break</span><span class="p">;</span>
                    <span class="p">}</span>

                    <span class="k">if</span> <span class="p">(</span><span class="nx">xy</span><span class="p">)</span> <span class="p">{</span>
                        <span class="k">this</span><span class="p">.</span><span class="nx">_doAlign</span><span class="p">(</span><span class="nx">widgetPoint</span><span class="p">,</span> <span class="nx">xy</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="nx">xy</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span>
                    <span class="p">}</span>
                <span class="p">}</span>
            <span class="p">},</span>

            <span class="cm">/**</span>
<span class="cm">             * Helper method, used to align the given point on the widget, with the XY page co-ordinates provided.</span>
<span class="cm">             *</span>
<span class="cm">             * @method _doAlign</span>
<span class="cm">             * @private</span>
<span class="cm">             * @param {String} widgetPoint Supported point constant (e.g. WidgetPositionAlign.TL)</span>
<span class="cm">             * @param {Number} x X page co-ordinate to align to</span>
<span class="cm">             * @param {Number} y Y page co-ordinate to align to</span>
<span class="cm">             */</span>
            <span class="nx">_doAlign</span> <span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">widgetPoint</span><span class="p">,</span> <span class="nx">x</span><span class="p">,</span> <span class="nx">y</span><span class="p">)</span> <span class="p">{</span>
                <span class="kd">var</span> <span class="nx">widgetNode</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">_posNode</span><span class="p">,</span>
                    <span class="nx">xy</span><span class="p">;</span>

                <span class="k">switch</span> <span class="p">(</span><span class="nx">widgetPoint</span><span class="p">)</span> <span class="p">{</span>
                    <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">TL</span><span class="o">:</span>
                        <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">x</span><span class="p">,</span> <span class="nx">y</span><span class="p">];</span>
                        <span class="k">break</span><span class="p">;</span>
                    <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">TR</span><span class="o">:</span>
                        <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">x</span> <span class="o">-</span> <span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">),</span> <span class="nx">y</span><span class="p">];</span>
                        <span class="k">break</span><span class="p">;</span>
                    <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">BL</span><span class="o">:</span>
                        <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">x</span><span class="p">,</span> <span class="nx">y</span> <span class="o">-</span> <span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">)];</span>
                        <span class="k">break</span><span class="p">;</span>
                    <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">BR</span><span class="o">:</span>
                        <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">x</span> <span class="o">-</span> <span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">),</span> <span class="nx">y</span> <span class="o">-</span> <span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">)];</span>
                        <span class="k">break</span><span class="p">;</span>
                    <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">TC</span><span class="o">:</span>
                        <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">x</span> <span class="o">-</span> <span class="p">(</span><span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">),</span> <span class="nx">y</span><span class="p">];</span>
                        <span class="k">break</span><span class="p">;</span>
                    <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">BC</span><span class="o">:</span>
                        <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">x</span> <span class="o">-</span> <span class="p">(</span><span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">),</span> <span class="nx">y</span> <span class="o">-</span> <span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">)];</span>
                        <span class="k">break</span><span class="p">;</span>
                    <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">LC</span><span class="o">:</span>
                        <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">x</span><span class="p">,</span> <span class="nx">y</span> <span class="o">-</span> <span class="p">(</span><span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">)];</span>
                        <span class="k">break</span><span class="p">;</span>
                    <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">RC</span><span class="o">:</span>
                        <span class="nx">xy</span> <span class="o">=</span> <span class="p">[(</span><span class="nx">x</span> <span class="o">-</span> <span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">)),</span> <span class="nx">y</span> <span class="o">-</span> <span class="p">(</span><span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">)];</span>
                        <span class="k">break</span><span class="p">;</span>
                    <span class="k">case</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">CC</span><span class="o">:</span>
                        <span class="nx">xy</span> <span class="o">=</span> <span class="p">[</span><span class="nx">x</span> <span class="o">-</span> <span class="p">(</span><span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">),</span> <span class="nx">y</span> <span class="o">-</span> <span class="p">(</span><span class="nx">widgetNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">)];</span>
                        <span class="k">break</span><span class="p">;</span>
                    <span class="k">default</span><span class="o">:</span>
                        <span class="nx">Y</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&quot;align: Invalid Points Argument&quot;</span><span class="p">,</span> <span class="s2">&quot;info&quot;</span><span class="p">,</span> <span class="s2">&quot;widget-position-align&quot;</span><span class="p">);</span>
                        <span class="k">break</span><span class="p">;</span>
                <span class="p">}</span>

                <span class="k">if</span> <span class="p">(</span><span class="nx">xy</span><span class="p">)</span> <span class="p">{</span>
                    <span class="k">this</span><span class="p">.</span><span class="nx">move</span><span class="p">(</span><span class="nx">xy</span><span class="p">);</span>
                <span class="p">}</span>
            <span class="p">},</span>

            <span class="nx">_getRegion</span> <span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
                <span class="kd">var</span> <span class="nx">nodeRegion</span><span class="p">;</span>
                <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
                    <span class="nx">nodeRegion</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">_posNode</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">VIEWPORT_REGION</span><span class="p">);</span>
                <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
                    <span class="nx">node</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">Node</span><span class="p">.</span><span class="nx">one</span><span class="p">(</span><span class="nx">node</span><span class="p">);</span>
                    <span class="k">if</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
                        <span class="nx">nodeRegion</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">REGION</span><span class="p">);</span>
                    <span class="p">}</span>
                <span class="p">}</span>
                <span class="k">return</span> <span class="nx">nodeRegion</span><span class="p">;</span>
            <span class="p">},</span>

            <span class="cm">/**</span>
<span class="cm">             * Aligns the Widget to the provided node (or viewport) using the provided</span>
<span class="cm">             * points. The method can be invoked directly, however it will result in </span>
<span class="cm">             * the align attribute being out of sync with current position of the of Widget.</span>
<span class="cm">             * </span>
<span class="cm">             * @method align</span>
<span class="cm">             * @param {Node | String | null} node A reference (or selector string) for the Node which with the Widget is to be aligned.</span>
<span class="cm">             * If null is passed in, the Widget will be aligned with the viewport.</span>
<span class="cm">             * @param {Array[2]} points A two element array, specifying the points on the Widget and node/viewport which need to be aligned. </span>
<span class="cm">             * The first entry is the point on the Widget, and the second entry is the point on the node/viewport which need to align.</span>
<span class="cm">             * Valid point references are defined as static constants on the WidgetPositionAlign class. </span>
<span class="cm">             * </span>
<span class="cm">             * e.g. [WidgetPositionAlign.TL, WidgetPositionAlign.TR] will align the top-left corner of the Widget with the top-right corner of the node/viewport.</span>
<span class="cm">             */</span>
            <span class="nx">align</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">points</span><span class="p">)</span> <span class="p">{</span>
                <span class="k">this</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ALIGN</span><span class="p">,</span> <span class="p">{</span><span class="nx">node</span><span class="o">:</span> <span class="nx">node</span><span class="p">,</span> <span class="nx">points</span><span class="o">:</span><span class="nx">points</span><span class="p">});</span>
            <span class="p">},</span>

            <span class="cm">/**</span>
<span class="cm">             * Centers the container in the viewport, or if a node is passed in,</span>
<span class="cm">             * the node.</span>
<span class="cm">             *</span>
<span class="cm">             * @method centered</span>
<span class="cm">             * @param {Node | String} node Optional. A node reference or selector string defining the node </span>
<span class="cm">             * inside which the Widget is to be centered. If not passed in, the Widget will be centered in the </span>
<span class="cm">             * viewport.</span>
<span class="cm">             */</span>
            <span class="nx">centered</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
                <span class="k">this</span><span class="p">.</span><span class="nx">align</span><span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="p">[</span><span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">CC</span><span class="p">,</span> <span class="nx">PositionAlign</span><span class="p">.</span><span class="nx">CC</span><span class="p">]);</span>
            <span class="p">}</span>
        <span class="p">};</span>

        <span class="nx">Y</span><span class="p">.</span><span class="nx">WidgetPositionAlign</span> <span class="o">=</span> <span class="nx">PositionAlign</span><span class="p">;</span>
</pre></div>

                    </div>
			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_align-plugin.html" title="align-plugin">align-plugin</a></li>
                                <li class=""><a href="module_anim.html" title="anim">anim</a></li>
                                <li class=""><a href="module_async-queue.html" title="async-queue">async-queue</a></li>
                                <li class=""><a href="module_attribute.html" title="attribute">attribute</a></li>
                                <li class=""><a href="module_base.html" title="base">base</a></li>
                                <li class=""><a href="module_cache.html" title="cache">cache</a></li>
                                <li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
                                <li class=""><a href="module_collection.html" title="collection">collection</a></li>
                                <li class=""><a href="module_console.html" title="console">console</a></li>
                                <li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li>
                                <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
                                <li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li>
                                <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
                                <li class=""><a href="module_datatype.html" title="datatype">datatype</a></li>
                                <li class=""><a href="module_dd.html" title="dd">dd</a></li>
                                <li class=""><a href="module_dom.html" title="dom">dom</a></li>
                                <li class=""><a href="module_dump.html" title="dump">dump</a></li>
                                <li class=""><a href="module_event.html" title="event">event</a></li>
                                <li class=""><a href="module_event-custom.html" title="event-custom">event-custom</a></li>
                                <li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
                                <li class=""><a href="module_history.html" title="history">history</a></li>
                                <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
                                <li class=""><a href="module_intl.html" title="intl">intl</a></li>
                                <li class=""><a href="module_io.html" title="io">io</a></li>
                                <li class=""><a href="module_json.html" title="json">json</a></li>
                                <li class=""><a href="module_loader.html" title="loader">loader</a></li>
                                <li class=""><a href="module_node.html" title="node">node</a></li>
                                <li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
                                <li class=""><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li>
                                <li class=""><a href="module_oop.html" title="oop">oop</a></li>
                                <li class=""><a href="module_overlay.html" title="overlay">overlay</a></li>
                                <li class=""><a href="module_plugin.html" title="plugin">plugin</a></li>
                                <li class=""><a href="module_pluginhost.html" title="pluginhost">pluginhost</a></li>
                                <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
                                <li class=""><a href="module_querystring.html" title="querystring">querystring</a></li>
                                <li class=""><a href="module_queue-promote.html" title="queue-promote">queue-promote</a></li>
                                <li class=""><a href="module_shim-plugin.html" title="shim-plugin">shim-plugin</a></li>
                                <li class=""><a href="module_slider.html" title="slider">slider</a></li>
                                <li class=""><a href="module_sortable.html" title="sortable">sortable</a></li>
                                <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
                                <li class=""><a href="module_substitute.html" title="substitute">substitute</a></li>
                                <li class=""><a href="module_swf.html" title="swf">swf</a></li>
                                <li class=""><a href="module_swfdetect.html" title="swfdetect">swfdetect</a></li>
                                <li class=""><a href="module_tabview.html" title="tabview">tabview</a></li>
                                <li class=""><a href="module_test.html" title="test">test</a></li>
                                <li class=""><a href="module_widget.html" title="widget">widget</a></li>
                                <li class=""><a href="module_widget-anim.html" title="widget-anim">widget-anim</a></li>
                                <li class=""><a href="module_widget-child.html" title="widget-child">widget-child</a></li>
                                <li class=""><a href="module_widget-locale.html" title="widget-locale">widget-locale</a></li>
                                <li class=""><a href="module_widget-parent.html" title="widget-parent">widget-parent</a></li>
                                <li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li>
                                <li class="selected"><a href="module_widget-position-align.html" title="widget-position-align">widget-position-align</a></li>
                                <li class=""><a href="module_widget-position-constrain.html" title="widget-position-constrain">widget-position-constrain</a></li>
                                <li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li>
                                <li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li>
                                <li class=""><a href="module_yui.html" title="yui">yui</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="WidgetPositionAlign.html" title="WidgetPositionAlign">WidgetPositionAlign</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class="selected"><a href="Widget-PositionAlign.js.html" title="Widget-PositionAlign.js">Widget-PositionAlign.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2010 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">

    var ALL_YUI_PROPS = [{"access": "protected", "host": "WidgetPositionAlign", "name": "_afterAlignChange", "url": "WidgetPositionAlign.html#method__afterAlignChange", "type": "method"}, {"access": "", "host": "WidgetPositionAlign", "name": "align", "url": "WidgetPositionAlign.html#method_align", "type": "method"}, {"access": "", "host": "WidgetPositionAlign", "name": "align", "url": "WidgetPositionAlign.html#config_align", "type": "config"}, {"access": "", "host": "WidgetPositionAlign", "name": "alignChange", "url": "WidgetPositionAlign.html#event_alignChange", "type": "event"}, {"access": "protected", "host": "WidgetPositionAlign", "name": "_bindUIStack", "url": "WidgetPositionAlign.html#method__bindUIStack", "type": "method"}, {"access": "", "host": "WidgetPositionAlign", "name": "centered", "url": "WidgetPositionAlign.html#method_centered", "type": "method"}, {"access": "", "host": "WidgetPositionAlign", "name": "centered", "url": "WidgetPositionAlign.html#config_centered", "type": "config"}, {"access": "", "host": "WidgetPositionAlign", "name": "centeredChange", "url": "WidgetPositionAlign.html#event_centeredChange", "type": "event"}, {"access": "private", "host": "WidgetPositionAlign", "name": "_doAlign", "url": "WidgetPositionAlign.html#method__doAlign", "type": "method"}, {"access": "protected", "host": "WidgetPositionAlign", "name": "_setAlignCenter", "url": "WidgetPositionAlign.html#method__setAlignCenter", "type": "method"}, {"access": "protected", "host": "WidgetPositionAlign", "name": "_syncUIPosAlgin", "url": "WidgetPositionAlign.html#method__syncUIPosAlgin", "type": "method"}, {"access": "protected", "host": "WidgetPositionAlign", "name": "_uiSetAlign", "url": "WidgetPositionAlign.html#method__uiSetAlign", "type": "method"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.ATTRS", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.ATTRS", "type": "property"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.BC", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.BC", "type": "property"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.BL", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.BL", "type": "property"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.BR", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.BR", "type": "property"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.CC", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.CC", "type": "property"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.LC", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.LC", "type": "property"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.RC", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.RC", "type": "property"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.TC", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.TC", "type": "property"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.TL", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.TL", "type": "property"}, {"access": "", "host": "WidgetPositionAlign", "name": "WidgetPositionAlign.TR", "url": "WidgetPositionAlign.html#property_WidgetPositionAlign.TR", "type": "property"}];
</script>
</body>
</html>
